Optical codes are patterns made up of image areas having different light reflective or light emissive properties, which are typically assembled in accordance with a priori rules. The term "bar code" is sometimes used to describe certain kinds of optical codes. The optical properties and patterns of optical codes are selected to distinguish them in appearance from the background environments in which they are used. Devices for identifing or extracting data from optical codes are sometimes referred to as "optical code" readers, of which bar code scanners are one type.
Optical code readers are used in both fixed or portable installations in many diverse environments such as in stores for check-out services, in manufacturing locations for work flow and inventory control and in transport vehicles for tracking package handling. The optical code can be used as a rapid, generalized means of data entry, for example, by reading a target code from a printed listing of many codes. In some uses, the optical code reader is connected to a portable data processing device or a data collection and transmission device. Frequently, the optical code reader includes a handheld sensor which is manually directed at a target code.
Most conventional optical scanning systems are designed to read one-dimensional bar code symbols, such as the ubiquitous UPC code. Typically, bar codes include a pattern of variable-width rectangular bars separated by fixed or variable width spaces. The bars and spaces have different light reflecting characteristics. One example of a one dimensional bar code is the UPC/EAN code used to identify, for example, product inventory. An example of a two-dimensional or stacked bar code is the PDF417 bar code. A description of PDF417 bar code and techniques for decoding it are disclosed in U.S. Pat. No. 5,635,697 to Shellhammer et al and assigned to Symbol Technologies, Inc., which patent is incorporated herein by reference. Another conventional optical code is known as "MaxiCode". It consists of a central finder pattern or bull's eye center and a grid of hexagons surrounding the central finder. It should be noted that the aspects of the inventions disclosed in this patent application are applicable to optical code readers, in general, without regard to the particular type of code or codes which they are adapted to read. In fact, the present invention is specifically adapted to operate as an omnicode reader, i.e., able to read many different types of codes. The invention described may also be applicable to some associated image recognition or analysis.
Most conventional scanning systems generate one or more beams of laser light which reflects off a bar code symbol and back to the scanning system. The system obtains a continuous analog waveform corresponding to the light reflected by the code along one or more scan lines of the system. The system then decodes the waveform to extract information from the bar code. A system of this general type is disclosed, for example, in U.S. Pat. No. 4,251,798, assigned to Symbol Technologies, Inc. A beam scanning system for detecting and decoding one and two dimensional bar codes is disclosed in U.S. Pat. No. 5,561,283, also assigned to Symbol Technologies, Inc.
Bar codes can also be read employing imaging devices. For example an image sensor may be employed which has a two dimensional array of cells or photo sensors which correspond to image elements or pixels in a field of view of the device. Such an image sensor may be a two dimensional or area charge coupled device (CCD) and associated circuits for producing electrical signals corresponding to a two-dimensional array of pixel information for a field of view. The pixel information generated by the CCD can, after digitization, be stored in a memory device for subsequent image processing which is used to locate and decode the codes which have been electronically captured by the CCD.
U.S. Pat. No. 5,268,580 to Duanfeng He (one of the Applicants of the present invention) describes a known imaging device that is used to read bar codes. This patent describes a technique for evaluating the pixel information stored in the memory device to determine bar edges as part of the process of locating a bar code. However, the device described in the He patent is limited to use in reading one particular type of optical code, i.e., bar codes. As described above, today there are many different types of codes available, many of which may be unreadable using the imaging device described in the He patent.
Accordingly, it is an object of the present invention to provide apparatuses and methods which can be used to efficiently decode many different types of codes, preferably independently of user interaction, which types of devices and methods are referred to herein by the word "omnicode".
Some omnicode devices have already been designed to read different types of codes. These conventional omnicode readers may use an unsophisticated, trial and error approach to decipher the information provided in the scanned codes. For example, these devices may sample the image in one or more directions, e.g., by drawing lines across the image to identify dimensional values, and then attempt to decode the sampled information in a variety of ways until an intelligible pattern match is achieved. Thus, this approach might first evaluate a sample as a bar code, then as a two-dimensional PDF code, then as a MaxiCode, and so on until the code is successfully decoded. However, this approach is very processing power intensive and becomes more and more inefficient as the number of different types of codes increases.
Accordingly, it is another object of the invention to avoid trial and error approaches to decoding by identifying the code type before decoding.
As mentioned above, one of the tasks involved in reading an optical code involves sampling the code to determine dimensional values of the code elements. For example, a one-dimensional bar code can be decoded by determining the widths of the code elements (i.e, bars and/or spaces) and matching those values against predetermined patterns. In a conventional laser scanning device, the samples were taken directly by sweeping a beam across the code to obtain a sample line across all of the code elements. These samples could then be used to determine the needed dimensional values and decode the bar code. The scanning line of the device was visible to the user so that it could be properly directed depending upon the orientation of the bar code being scanned.
In imaging devices, however, information is obtained for a two dimensional area defined by the field of view of the device. One or more codes of the same or different types may be disposed in this area. The orientation of the code or codes may be arbitrary relative to the field of view. The field of view may also include environmental background and regions which are devoid of optical codes. The resultant digitized information is available in memory as, for example, gray scale pixel values and the image processing circuitry and/or software must determine which pixels values should be evaluated to read the optical code. This selection or sampling process is referred to herein as "line drawing", since it involves the selection of pixels relative to an ideal scanning line whose values are checked to determine code element dimensions.
Accordingly, it is another object of the invention to provide appropriate line drawing techniques to sample the pixel values in memory which take into account the arbitrary nature of the type of code being read and its orientation.